class Dog(object):
    def __init__(self,name,color):
        self.name = name
        self.color = color


    def run(self):
        print(f"{self.color}的{self.name}在公园跑步")


dog1 = Dog("小黄","黄色")
dog2 = Dog("小黑","黑色")


dog1.run()
dog2.run()


class Cat(object):
    def __init__(self, name, color):
        self.name = name
        self.color = color

    def eat(self):
        print(f"{self.color}的{self.name}在吃东西")


xiaohei = Cat("小黑", "黑色")
xiaohei.eat()
